﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Server.Biz;
using Server.Model;

namespace ServerService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class Service1 : IService1
    {
        private CommandService service = null;

        public Service1()
        {
            service = new CommandService();
        }

        public void SetCommand(Status pStatus, long pClientID, long pUserID, string pUserName)
        {
            service.SetCommand(pStatus, pClientID, pUserID, pUserName);
        }

        public bool ReportError()
        {
            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pStatus"></param>
        /// <param name="pClientID"></param>
        /// <param name="pOperID"></param>
        /// <param name="pOperName"></param>
        /// <returns></returns>
        public Status? UpdateStatusAndGetLatestedCommand(Status pStatus, long pClientID, long pOperID, string pOperName)
        {
            return service.UpdateStatusAndGetLatestedCommand(pStatus, pClientID, pOperID, pOperName);
        }
    }
}
